﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace EndlessGalaxy
{
    public partial class NamePrompt : Form
    {
        public NamePrompt(Image pic)
        {
            InitializeComponent();
            pictureBox1.Image = pic;
            AcceptButton = button1;
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            if (textBox1.Text.Length >= 2)
            {
                button1.Enabled = true;
            }
            else
            {
                button1.Enabled = false;
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Globals.promptname = textBox1.Text;
            this.Close();
        }
    }
}
